﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Asoft.Web.Models
{
    public class GridResult
    {
        public GridResult()
        {
            this.Datas = new List<object>();
            this.PageCount = 1;
            this.PageIndex = 1;
        }

        public void AddRange<T>(List<T> list)
        {
            if (list == null || list.Count == 0)
            {
                return;
            }
            list.ForEach(p => Datas.Add(p));
        }

        public List<object> Datas { get; private set; }
        public int PageIndex { get; set; }
        public int PageCount { get; set; }
        public int DataCount { get; set; }
        public int PageSize { get; set; }
    }
}